package com.faiz.generic.mylist;

import com.faiz.generic.Person;

import java.util.HashSet;
import java.util.Set;

public class TestHash {

    public static void main(String[] args) {
        Person faiz = new Person("faiz", 10);
        Person faiz1 = new Person("faiz", 20);
        Set<Person> set = new HashSet<>();
        set.add(faiz);
        System.out.println(set.contains(faiz1));
    }
}
